﻿using System;
namespace ORS.OrderRobot.Service.Helper
{
	public class MsgData
	{
		/// <summary>
		/// 对象
		/// </summary>
		public string Obj { get; set; } = "";
		/// <summary>
		/// 干什么
		/// </summary>
		public string Action { get; set; } = "";
		/// <summary>
		/// 消息类型
		/// </summary>
		public string Type { get; set; } = "info";
		/// <summary>
		/// 用了多少毫秒
		/// </summary>
		public long? UsedTime { get; set; }
		/// <summary>
		/// 目录
		/// </summary>
		public string Category { get; set; } = "default";

        public override string ToString()
        {
            return $"{Obj}:{Action} {( !string.IsNullOrEmpty(UsedTime?.ToString()) ? "用时:" + UsedTime+"ms" : "" )}";
        }
    }
}

